<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="layout :: htmlhead" th:with="title='渠道信息管理'"></head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头-->
    <div th:replace="fragments/head :: header"></div>

    <div class="layui-body" style="margin: 1%">

        <form id="merchantSearch" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <div class="layui-form-item">
                <label class="layui-form-label">渠道编号</label>
                <div class="layui-input-inline">
                    <input id="id" name="channelId" autocomplete="off" class="layui-input" type="text"/>
                </div>
                <label class="layui-form-label">渠道名</label>
                <div class="layui-input-inline">
                    <input id="channelName" name="channelName" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">商户编号</label>
                    <div class="layui-input-inline">
                        <input id="mchId" name="mchId" autocomplete="off" class="layui-input" type="text"/>
                    </div>

                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    <button class="layui-btn"  lay-submit="" lay-filter="searchSubmit">提交</button>
                </div>
            </div>

        </form>

        <!--<hr class="layui-bg-blue"/>-->
        <hr class="layui-bg-black"/>

        <button class="layui-btn layui-btn-normal" onclick="addChannel()">添加渠道</button>


        <div style="display:none;" id="currentUser"><shiro:principal property="id"></shiro:principal></div>

        <table id="merchantList" lay-filter="merchantTable"></table>

        <script type="text/html" id="optBar">
            {{#  if(d.state == '0'){ }}
            <a class="layui-btn layui-btn-xs" lay-event="edit">开启</a>
            {{#  } else { }}
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="recover">停用</a>
            {{#  } }}
        </script>
    </div>
<!--下架-->
    <div id="ApplyPass" class="layer_self_wrap" style="width:500px;display:none;">
        <form id="userForm" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <input id="pageNum" type="hidden" name="pageNum"/>
            <input id="ccid" type="hidden" name="cid"/>
            <div class="layui-form-item">
                <label class="layui-form-label">操作密码</label>
                <div class="layui-input-inline">
                    <input id="oPwd" name="operationPwd" autocomplete="off" class="layui-input" type="password" placeholder="" />
                </div>
                <div class="layui-form-mid layui-word-aux">请填写6位操作密码</div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <button class="layui-btn"  lay-submit="" lay-filter="userSubmit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
  <!--修改房源信息-->
    <div id="setMerchant" class="layer_self_wrap" style="width:500px;display:none;">
        <form id="MerchantForm" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <input id="pageNum1" type="hidden" name="pageNum"/>
            <input id="cid" type="hidden" name="cid"/>
            <div class="layui-form-item">
                <label class="layui-form-label">操作密码</label>
                <div class="layui-input-inline">
                    <input id="operationPwd" name="operationPwd" autocomplete="off" class="layui-input" type="password" placeholder="" />
                </div>
                <div class="layui-form-mid layui-word-aux">请填写6位操作密码</div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <button class="layui-btn"  lay-submit="" lay-filter="MerchantSubmit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <div id="addChannel" class="layer_self_wrap" style="width:500px;display:none;">
        <form id="ChannelForm" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <input id="pageNum2" type="hidden" name="pageNum"/>
            <div class="layui-form-item">
                <label class="layui-form-label">渠道编号</label>
                <div class="layui-input-inline">
                    <select name="channelId"  xm-select="channelId">
                        <option value="1">ALIPAY_PC</option>
                        <option value="2">ALIPAY_mobile</option>
                        <option value="3">WX_mobile</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">渠道名称</label>
                <div class="layui-input-inline">
                    <select name="channelName"  xm-select="channelName">
                        <option value="1">ALIPAY</option>
                        <option value="2">WX</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">渠道商户编号</label>
                <div class="layui-input-inline">
                    <input id="channelMchId" name="channelMchId" autocomplete="off" class="layui-input" type="text" placeholder="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">商户编号</label>
                <div class="layui-input-inline">
                    <input id="mmchId" name="mchId" autocomplete="off" class="layui-input" type="text" placeholder="" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">配置参数</label>
                <div class="layui-input-inline">
                    <textarea name="param" cols="" rows="5" id="param" class="layui-input" style="width: 300px;height: 100px;"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-inline">
                    <textarea name="remark" cols="" rows="5" id="remark" class="layui-input" style="width: 300px;height: 100px;"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <button class="layui-btn"  lay-submit="" lay-filter="channelSubmit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <!--底部-->
    <div th:replace="fragments/footer :: footer"></div>
    <script src="/js/dateUtils.js"></script>
    <script src="/js/channel/channelList.js"></script>

</div>
</body>
</html>